
<main class="form-signin w-100 m-auto">
  <%= form_for @user, {  url: users_path, method: :post  } do |f| %>
    <%= image_tag "logo.png", alt: "logo",  style: "width: 100px; height: 100px;"%>
    <div class="form-group">
      <ul class="list-unstyled">
        <% @user.errors.messages.values.flatten.each do |error| %>
        <li><i class="fa fa-exclamation-circle"></i><%= error %></li>
        <% end -%>
      </ul>
    </div>
    <div class="form-floating">
      <%= f.text_field :username, class: "form-control", autofocus: true, placeholder: "请输入用户名", style: "border-radius:  6px 6px 0 0 !important;" %>
      <%= label_tag :username, "用户名" %>
    </div>
    <div class="form-floating">
      <%= f.password_field :password, class: "form-control border-top-0", placeholder: "请输入密码", style: "border-radius:   0 !important;" %>
      <%= label_tag :password, "密码" %>
    </div>
    <div class="form-floating mb-3">
      <%= f.password_field :password_confirmation, class: "form-control border-top-0", placeholder: "请确认密码", style: "border-radius:  0 0  6px 6px !important;" %>
      <%= label_tag :password_confirmation, "确认密码" %>
    </div>
    <div class="form-floating">
      <%= f.submit "注册", class: " w-100 btn btn-lg btn-primary mb-2" %>
      <%= link_to "登录", new_session_path %>
    </div>
  <% end %>
</main>
<style>
  .border-radius-0 {
      border-radius: 0;
  }

</style>